package com.clx.rmp.mx;

import com.clx.rmp.common.constant.DirConstant;
import com.clx.rmp.common.classloader.MyClassLoader;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

@Slf4j
public class App {
    public static void main(String[] args) {
        //0.提取参数
        Map<String, Double> map = new HashMap<String, Double>();
        map.put("x1", 5.1);
        map.put("x2", 3.5);
        map.put("x3", 0.4);
        map.put("x4", 0.2);

        //2.类加载密文 "com.clx.rmp.mx.core.ExePmml"
        try {
            MyClassLoader mc = new MyClassLoader(DirConstant.CONF_HOME_DIR);
            Object o = Class.forName("com.clx.rmp.mx.core.ExePmml", true, mc).newInstance();
            o.getClass().getMethod("test").invoke(o);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
